{% extends "app/layout.html" %}

{% block content %}

<h2>Polls.</h2>
<br/>

{% if latest_poll_list %}
<table class="table table-hover">
    <tbody>
        {% for poll in latest_poll_list %}
        <tr>
            <td>
              <h2>  <a href="{% url 'app:detail' poll.id %}">{{poll.text}}</a></h2>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% else %}
<p>No polls available.</p>
<br />
<p>You can add a set of sample polls.</p>
<form action="/seed" method="post">
    {% csrf_token %}
    <button class="btn btn-primary" type="submit">Create Sample Polls</button>
</form>
<br />
<p>You can design new polls using the Django administration interface.</p>
<p><a href="/admin" class="btn btn-primary btn-large">Django Administration &raquo;</a></p>
{% endif %}

{% endblock %}
